﻿package net.libra.core 
{
	import net.libra.core.interfaces.INotifier;
	import net.libra.core.interfaces.IProxy;

	/**
	 * 数据对象基类
	 * @author elvisjiang
	 */
	public class Proxy implements IProxy,INotifier
	{
		protected var data : Object;
		protected var facade:Facade;

		/**
		 * 创建一个Proxy对象
		 * @param data		Proxy对象
		 */
		public function Proxy (data : Object = null)
		{
			this.facade = Facade.getInstance();
			this.data = data;
		}

		/**
		 * @inheritDoc
		 */
		public function setData (data : Object) : void
		{
			this.data = data;
		}

		/**
		 * @inheritDoc
		 */
		public function getData () : Object
		{
			return this.data;
		}

		/**
		 * @inheritDoc
		 */
		public function sendNotification (name : String,data : Object = null,controllerName:String = "",type : String = "") : void
		{
			
			this.facade.sendNotification( name , data , controllerName , type );
			
		}
	}
}
